feat(windows): use cmake to configure windows integration DLL version
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 9 May 2025 13:07:25 +0000 (15:07 +0200)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 30 May 2025 07:40:29 +0000 (09:40 +0200)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
shell_integration/windows/NCUtil/CMakeLists.txt
shell_integration/windows/NCUtil/Version.h [deleted file]
shell_integration/windows/NCUtil/Version.h.in [new file with mode: 0644]

index fa75e159380aae0b77bad009db70fcd6b82b9f06..1b5610253799ec701254415e2c00da6ab27a6ae3 100644 (file)
@@ -7,5 +7,6 @@ add_library(NCUtil STATIC
 
 target_include_directories(NCUtil
     PUBLIC
-        "${CMAKE_CURRENT_SOURCE_DIR}"
+        ${CMAKE_CURRENT_SOURCE_DIR}
+        ${CMAKE_CURRENT_BINARY_DIR}
 )
diff --git a/shell_integration/windows/NCUtil/Version.h b/shell_integration/windows/NCUtil/Version.h
deleted file mode 100644 (file)
index 3651569..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#pragma once
-
-// This is the number that will end up in the version window of the DLLs.
-// Increment this version before committing a new build if you are today's shell_integration build master.
-#define NCEXT_BUILD_NUM 47
-
-#define STRINGIZE2(s) #s
-#define STRINGIZE(s) STRINGIZE2(s)
-
-#define NCEXT_VERSION 3,0,0,NCEXT_BUILD_NUM
-#define NCEXT_VERSION_STRING STRINGIZE(NCEXT_VERSION)
diff --git a/shell_integration/windows/NCUtil/Version.h.in b/shell_integration/windows/NCUtil/Version.h.in
new file mode 100644 (file)
index 0000000..eb97edb
--- /dev/null
@@ -0,0 +1,11 @@
+#pragma once
+
+// This is the number that will end up in the version window of the DLLs.
+// Increment this version before committing a new build if you are today's shell_integration build master.
+#cmakedefine NCEXT_BUILD_NUM @NCEXT_BUILD_NUM@
+
+#define STRINGIZE2(s) #s
+#define STRINGIZE(s) STRINGIZE2(s)
+
+#cmakedefine NCEXT_VERSION @NCEXT_VERSION@
+#define NCEXT_VERSION_STRING STRINGIZE(NCEXT_VERSION)